package la.iok.hzsvn.lewin.movie.cloud.model;

import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.Collections;
import java.util.Map;

@ConfigurationProperties("app.wx.mini")
public class WxMiniProperties {
    private Map<Integer, WxMiniProgram> clients = Collections.emptyMap();

    public void setClients(Map<Integer, WxMiniProgram> clients) {
        this.clients = clients;
    }

    public WxMiniProgram find(Integer client) {
        return clients.get(client);
    }
    public static class WxMiniProgram {
        private String appId;
        private String secret;

        public String getAppId() {
            return appId;
        }

        public void setAppId(String appId) {
            this.appId = appId;
        }

        public String getSecret() {
            return secret;
        }

        public void setSecret(String secret) {
            this.secret = secret;
        }
    }
}
